// 用户
import http from '../utils/http.js';

/**
 * 首页信息
 * @param {object} data
 * @returns 
*/
export const indexMSG = (data)=>{
    return http.get('/auth/address/home',data)
}

/**
 * 用户地址列表
 * @param {object} data
 * @returns
*/
export const GetAddressList = (data)=>{
    return http.get('/auth/address/address/list',data)
}

/**
 * 用户地址修改
 * @param {object} data
 * @returns
*/
export const UpdataAddress = (data)=>{
    return http.put('/auth/address/address',data)
}
/**
 * 用户地址添加
 * @param {object} data
 * @returns
*/
export const AddAddress = (data)=>{
    return http.post('/auth/address/address',data)
}
/**
 * 删除默认地址
*/
export const DeleteAddress = (addressId)=>{
    return http.delete(`/auth/address/address/${addressId}`)
}
/**
 * 地址详情
*/
export const AddressDetail = (addressId)=>{
    return http.get(`/auth/address/address/${addressId}`)
}
/**
 * 用户信息查询
*/
export const GetUserInfo = ()=>{
    return http.get('/auth/address/userInfo')
}

/**
 * 修改用户信息
*/
export const UpdataInfo=(data)=>{
    return http.put('/auth/address/userInfo',data)
}

/**
 * 用户分享
*/
export const userShare = ()=>{
    return http.get('/auth/address/share')
}

/**
 * 获取返佣收益信息
 */
export const GetInviteRebateInfo = (data)=>{
    return http.get('/auth/address/getInviteRebateInfo/page',data)
}

/**
 * 上传
*/
export const UploadImg = (data)=>{
    return http.post('/auth/common/upload',data)
}

